package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentCapitalPoolDetailsFallBack;
import cn.cs.pojo.CapitalPoolDetails;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-agent-provider", configuration = CsConfiguration.class, fallback = AgentCapitalPoolDetailsFallBack.class)
public interface AgentCapitalPoolDetailsClient {


    @RequestMapping(value = "/getCapitalPoolDetailsById", method = RequestMethod.POST)
    public CapitalPoolDetails getCapitalPoolDetailsById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getCapitalPoolDetailsListByMap", method = RequestMethod.POST)
    public List<CapitalPoolDetails> getCapitalPoolDetailsListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getCapitalPoolDetailsCountByMap", method = RequestMethod.POST)
    public Integer getCapitalPoolDetailsCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addCapitalPoolDetails", method = RequestMethod.POST)
    public Integer addCapitalPoolDetails(@RequestBody CapitalPoolDetails capitalPoolDetails) throws Exception;

    @RequestMapping(value = "/modifyCapitalPoolDetails", method = RequestMethod.POST)
    public Integer modifyCapitalPoolDetails(@RequestBody CapitalPoolDetails capitalPoolDetails) throws Exception;

    @RequestMapping(value = "/deleteCapitalPoolDetailsById", method = RequestMethod.POST)
    public Integer deleteCapitalPoolDetailsById(@RequestParam("id") String id) throws Exception;

}

